<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'change_pwd.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="./css/style.css">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript">
	function checkPwd() {
		var nupwd = document.getElementById('nupwd').value;
		var nupwd_ = document.getElementById('nupwd_').value;
		if (nupwd == nupwd_) {
			document.admin.submit();
		} else {
			alert("两次输入的新密码不一致！请重新输入！");
		}
	}
</script>
		<s:if test="#session.admin==null">
			<script>
	self.top.location.href = '../login.jsp';
</script>
		</s:if>
	</head>

	<body>
		<div class="all">
			<div class="main">
				<h3>
					修改密码
				</h3>
				<s:form action="admin!changePassword.action" namespace="/">
					<s:password name="upwd" id="upwd" label="旧密码"></s:password>
					<s:password name="nupwd" id="nupwd" label="新密码"></s:password>
					<s:password name="nupwd_" id="nupwd_" label="确认"></s:password>
					<tr align="right">
						<td>
						</td>
						<td>
							<input type="button" value="提交" onclick="checkPwd()" />
						</td>
					</tr>
				</s:form>
			</div>
		</div>
	</body>
</html>
